package com.example.maxboxtwo.components.activities;

import android.os.Bundle;
import android.util.Log;

import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.annotation.Nullable;
import androidx.appcompat.app.AppCompatActivity;
import androidx.recyclerview.widget.RecyclerView;
import com.example.maxboxtwo.R;
import com.example.maxboxtwo.components.function.LED.LEDFunction;
import com.example.maxboxtwo.utils.adapters.LEDViewAdapter;


public class LEDActivity extends AppCompatActivity{
    private RecyclerView recyclerView ;
    private LEDFunction ledFunction;
    private final int images[] = new int[]{R.drawable.led_ico_android,R.drawable.led_ico_heart,
            R.drawable.led_ico_bean,R.drawable.led_ico_beer,R.drawable.led_ico_happy,R.drawable.led_ico_mail,
            R.drawable.led_ico_sad,R.drawable.led_ico_sos};
    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.led_main_activity);
        this.ledFunction = findViewById(R.id.picture);
        LinearLayoutManager linearLayout = new LinearLayoutManager(this);
        linearLayout.setOrientation(LinearLayoutManager.HORIZONTAL);
        recyclerView = findViewById(R.id.ledLight);
        recyclerView.setLayoutManager(linearLayout);
        recyclerView.setAdapter(new LEDViewAdapter(images,ledFunction));
    }

}
